<?php

/**
 * Created by PhpStorm.
 * User: wukent
 * Date: 2017/9/25
 * Time: 下午4:03
 */
class UsersModel extends Model
{
    protected $trueTableName = 'ecs_users';

    public function getInfo($uid) {
        $where = array('user_id'=>$uid);
        $data = $this->field('user_id,user_pic,nick_name,rank_points')->where($where)->find();
        return $data;
    }

    public function uppoints($uid,$actual_points) {
        $edata['rank_points'] = $actual_points;
        $where = array('user_id'=>$uid);
        $data = $this->where($where)->save($edata);
        return $data;
    }

}